The present invention relates to a memory card having a one-time programmable memory.
Digital cameras, such as the Kodak DC 4800 camera, capture images of a scene using a solid state image sensor, and store the resulting image data on a solid-state memory card, such as a compact flash card, which uses Flash EPROM memory. The card can be removed from the camera, and inserted into a card reader, so that the images can be transferred from the card to a personal computer. The card can then be erased and reused. The DOS-FAT system is normally used to store and retrieve the image files stored on Flash EPROM memory cards. Unfortunately, the cost of Flash EPROM memory is relatively high, and therefore such erasable memory cards are expensive. Various technologies have been developed to produce write-once memory. One example is described in U.S. Pat. Nos. 6,034,882 and 6,185,122. These write-once memory technologies offer significantly reduced cost, compared to Flash EPROM memory chips.
When personal computers were first introduced, a disc operating system or DOS was needed to access data from floppy discs and hard drives. This platform became ubiquitous and subsequent advancements on disc operating system still maintained backwards compatibility. With the advent of new devices such as removable memory cards, the most compatible method with existing host systems that already have DOS, was to make the device""s file system compatible with the DOS file structure commonly known as the FAT file system. The FAT system is documented in ISO/IEC 9293, xe2x80x9cInformation technology-Volume and file structure of disk cartridges for information interchangexe2x80x9d.
DOS""s structure includes a boot record, which is 1 sector (512 bytes) long, 2 File Allocation Tables (original and a back up FAT), a root directory, and the user data area. The FAT""s size is determined by an algorithm as a function of the number of sectors on the medium, the number of entries in the root directory amongst other variables. The number of entries in the FAT is equal to the number of clusters on the storage device.
Each entry in the FAT is either 12, 16, or 32 bits depending on the format of the volume. Since each entry represents the location of a segment of a file, the number of maximum addressable space or cluster is 2^12, 2^16, or 2^32 . Each cluster can be even binary multiples of sectors.
The root directory following the FAT contains the names of the files or folders and has a pointer to the first cluster of the named file or folder. The root directory consists of entries of 32 bytes for each file name and the number of the first cluster associated with the file. The remainder of the unused directory space is filled with 0""s.
At the same time, the FAT file system updates a FAT entry at an offset equal to the starting cluster of the file. The content of the entry is either all 1""s to indicate the last cluster used by the file or a non-zero number to indicate the cluster location of the next portion of the file or folder. With this technique, the FAT maps the cluster location of any particular file or folder. Again the last cluster used by a file or folder is indicated by all 1""s. A FAT entry with all 0""s would indicate a free cluster to be allocated.
In a write-once memory card to be used in a digital camera, it is very desirable to have the card be FAT compatible. This way, a memory card can be recognized as a drive by any hosts that are compatible with the FAT file system. In these write-once devices, the normal storage states are represented by 1""s. In rewritable systems, the 1""s are converted to 0""s in the FAT to indicate free cluster space, and programmed back to patterns of 1""s and 0""s to represent the file cluster locations. However, this approach presents a serious problem when applied to write-once devices. In write-once or one-time programmable devices that have an unprogrammed state of 1""s, the entire FAT and root directory must be written at once to program the file cluster locations and to zero out the 1""s in the unallocated clusters and unused space. The FAT and root directory therefore can only be programmed once.
In addition, in write-once or one-time programmable devices that have an unprogrammed state of 1""s, the entire FAT and root directory must be written at once if any of the previously written data need to be modified. The FAT and root directory can never be overwritten. As a result, moving a file presents a problem, since if a file is moved, new FAT clusters need to be allocated and the old ones zeroed out so they are available. Similarly, renaming a file presents a problem, since the root directory 32 byte entry for this file name needs to change. Deleting a file presents a problem, since the root directory 32 byte entry for this file name needs to change and the FAT clusters need to be zeroed out.
Some optical disc recording technologies, such as CD-R (recordable compact disc) are one-time programmable (OTP), so that once an area of the disc has been recorded, it cannot be erased. In order to record files on such a CD-R, a special software driver is required. The driver resides on the host computer, in order to convert the non-DOS file system used by the CD-R into a format, which appears to be DOS, to application software running on the host computer. Unfortunately, this requires each host computer to have a special software driver to support the non-DOS file system.
It is an object of the present invention to provide an improved memory card for revising and retrieving data files stored on a one-time programmable memory.
Another object of the present invention is to provide a memory card that enables OTP media, particularly OTP solid state memory, to appear as a DOS compatible disk drive to the host computer.
These objects are achieved by a memory card for use with a host device, comprising:
a) a one-time programmable memory having locations for storing a plurality of storage allocation tables, data files identified by the storage allocation tables, and a translation table; and
b) a controller for enabling the host device to access the one-time programmable memory and to modify the data files, wherein the controller:
i) stores initial data files, a first storage allocation table, and an initial translation table in the one-time programmable memory;
ii) accesses the translation table in the one-time programmable memory to identify the physical location of the first storage allocation table and returns such storage allocation table to the host device for subsequent accessing of the initial data files,
iii) nables the host device to modify at least one of the initial data files
iv) stores a second storage allocation table, different from the first storage allocation table, in the one-time programmable memory to enable the host device to access the modified data files;
v) amends the translation table to indicate the location of the second storage allocation table, wherein the amended traslation table includes a plurality of entries with the latest entry corrsesponding to the location of the latest storage allocation table in the one-time programmable memory, and the latest entry is the latest noninitialized entry; and
vi) accesses the amended translator table to identify the physical location of the second storage allocation table and returning such second storage allocation table to the host device to enable access of the modified data files.
It is an advantage of the present invention that a memory card having one-time programmable memory can be continuously compatible with a host device accessing said cards using the DOS-FAT file system, even if some of the files on the memory card are deleted, renamed, or moved.